/**
 * @author shentianyu
 * @date 2021-06-05 15:43
 */
public class ComputeFactory {

    private static final Add add = new Add();
    private static final Minus minus = new Minus();

    public static Computable getCompute(String symbol) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
        return (Computable) Class.forName(symbol).newInstance();
    }
}
